BIN=zlh.exe
CC=gcc
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
LFLAGS=-o
FLAGS=-c
RM=rm -f

$(BIN):$(OBJ)
		@$(CC) $(LFLAGS) $@ $^
		@echo "linking ... $^ to $@"
%.o:%.c
		@$(CC) $(FLAGS) $< -std=c99
		@echo "compling ... $< to $@"
.PHONY:clean
clean:
		$(RM) $(OBJ) $(BIN)
